<template>
  <div>
    <h1>计数器2</h1>
    <div>
      <h2>{{ num }}</h2>
      <button @click="num++">+</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 0,
    };
  },
  beforeCreate() {
    console.log("second----->beforeCreate");
  },
  created() {
    console.log("second----->created");
  },
  beforeMount() {
    console.log("second----->beforeMount");
  },
  mounted() {
    console.log("second----->mounted");
  },
  beforeUpdate() {
    console.log("second----->beforeUpdate");
  },
  updated() {
    console.log("second----->updated");
  },
  beforeDestroy() {
    console.log("second----->beforeDestroy");
  },
  destroyed() {
    console.log("second----->destroyed");
  },
  deactivated(){
   console.log('second------->deactivated缓存');
  },
  activated(){
    console.log('second------->activated激活');
  }
};
</script>

<style>
</style>